﻿using FluentNHibernate.Mapping;
using CsharpTrainer.NHibernate3.Entities;

namespace CsharpTrainer.NHibernate3.Mapping
{
    public class EmployeeMap : ClassMap<Employees>
    {
        public EmployeeMap()
        {
            Id(x => x.EmployeeID, "EmployeeID");
            Map(x => x.LastName)
                .Length(20)
                .Not.Nullable();
            Map(x => x.FirstName)
                .Length(10)
                .Not.Nullable();
            Map(x => x.Title)
                .Length(30);
            Map(x => x.BirthDate);
            Map(x => x.Address)
                .Length(60);
            Map(x => x.City)
                .Length(15);
            Map(x => x.Region)
                .Length(15);
            Map(x => x.Country)
                .Length(15);
            Map(x => x.Notes);
        }
    }
}
